#include<bits/stdc++.h>
using namespace std;

struct student{
    int id,as,bs;
};

int main ()
{
    int n;
    student s[1000];
    cin>>n;
    while(n--)
    {
        cin>>s[n].id>>s[n].as>>s[n].bs;
        if((s[n].as+s[n].bs>140)&&(s[n].as*7+s[n].bs*3>=800))
            cout<<"Excellent";
        else
            cout<<"Not excellent";
    }

    return 0;
    
}